﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RuYiAdmin.Net.UniversalFoundation.GeneralFoundationClass
{
    /// <summary>
    /// OpenIM数据描述
    /// </summary>
    public class OpenIMDataDescription
    {
    }

    [Serializable]
    public class OpenIMAdminLoginResInfo
    {
        [JsonProperty("errCode")]
        public int ErrCode { get; set; }

        [JsonProperty("errMsg")]
        public string ErrMsg { get; set; }

        [JsonProperty("errDlt")]
        public string ErrDlt { get; set; }

        [JsonProperty("data")]
        public OpenIMAdminInfo Data { get; set; }
    }

    [Serializable]
    public class OpenIMAdminInfo
    {
        [JsonProperty("adminAccount")]
        public string AdminAccount { get; set; }

        [JsonProperty("adminToken")]
        public string AdminToken { get; set; }

        [JsonProperty("nickname")]
        public string Nickname { get; set; }

        [JsonProperty("faceURL")]
        public string FaceURL { get; set; }

        [JsonProperty("level")]
        public int Level { get; set; }

        [JsonProperty("adminUserID")]
        public string AdminUserID { get; set; }

        [JsonProperty("imUserID")]
        public string ImUserID { get; set; }

        [JsonProperty("imToken")]
        public string ImToken { get; set; }
    }

    public class OpenIMUserInfo
    {
        [JsonProperty("nickname")]
        public string Nickname { get; set; }

        [JsonProperty("faceURL")]
        public string FaceURL { get; set; } = string.Empty;

        [JsonProperty("birth")]
        public long Birth { get; set; }

        [JsonProperty("gender")]
        public int Gender { get; set; } // 0:未知, 1:男, 2:女

        [JsonProperty("areaCode")]
        public string AreaCode { get; } = "+86";

        [JsonProperty("phoneNumber")]
        public string PhoneNumber { get; set; }

        [JsonProperty("password")]
        public string Password { get; set; }

        [JsonProperty("registerType")]
        public int RegisterType { get; } = 0;
    }

    public class PublicOpenIMUserInfo
    {
        [JsonProperty("userID")]
        public string UserID;

        [JsonProperty("nickname")]
        public string Nickname;

        [JsonProperty("faceURL")]
        public string FaceURL;

        [JsonProperty("ex")]
        public string Ex;

        [JsonProperty("createTime")]
        public long CreateTime;
    }
}
